package com.ovopark.organize.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ovopark.organize.server.model.entity.FranchiseesRegistration;
import com.ovopark.organize.server.model.query.FranchiseesRegistrationQuery;
import com.ovopark.organize.server.model.vo.FranchiseesRegistrationContentVo;
import com.ovopark.organize.server.model.vo.FranchiseesRegistrationVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @Description:
 * @Author:
 * @Date:
 */
public interface FranchiseesRegistrationMapper extends BaseMapper<FranchiseesRegistration> {

    
    List<FranchiseesRegistrationContentVo> getFranchiseesRegistrationContent(@Param("franchisees") String franchiseesList, @Param("groupId") Integer groupId,@Param("fields") String fields);


    List<FranchiseesRegistrationContentVo> getFranchiseesRegistrationById(@Param("registrationId") Integer registrationId,@Param("groupId") Integer groupId);

    IPage<FranchiseesRegistrationVo> selectFranchiseesRegistrationVoPage(@Param("page") Page<FranchiseesRegistrationVo> page,
                                                                         @Param("query") FranchiseesRegistrationQuery query,@Param("registrationIds") String registrationIds);

    void updateFollowUser(@Param("groupId") Integer groupId, @Param("registrationId") String registrationIds, @Param("userId")Integer userId,
                          @Param("followType") Integer followType, @Param("isDistribution") Boolean isDistribution,@Param("isCleanDistribution") Boolean isCleanDistribution,
                          @Param("nextFollowTime") Date nextFollowTime, @Param("finalFollowTime")Date finalFollowTime,@Param("isCleanFinalFollowUser") Boolean isCleanFinalFollowUser);

    void clearFollowTime( @Param("id") Integer id,  @Param("isCleanFinalFollowTime") Boolean isCleanFinalFollowTime,  @Param("isCleanNextFollowTime") Boolean isCleanNextFollowTime);

    void cleanFollowUserByRegistrationIds( @Param("registrationIds") String registrationIds);
}
